
                        	<div class="header-pastdeals">
                            	<div class="middle-box-white-half">
                                    <div id="divDangkyTitle" class="half-title">
                                        <div class="left"><h3>Deals gần đây</h3></div>
                                        <div class="right">
                                        <form action="" method="post" id="frmSearch">
                                             <div class="bg-email">
                                                <span class="bg-email"><span class="bg-email-inner"><input name="search" style="color: black;" id="txtSearch" type="text"></span><span class="btn-email-border"><a href="javascript:void(0)" id="btnSearchDealRecent" class="btn-email"><em>Tìm</em></a></span></span>                                           
                                            </div>
                                           </form>
                                        </div>
                                        <div class="clear"></div>                                    
                                    </div>                                
                                </div>
                                <div class="half-boder"></div>
                            </div>
                            <div class="list-pastdeals">
                            	<div id="divRecentDeal" class="inner-pastdeals">
                           <{if $listDeals|@count > 0}>
							<{ foreach from=$listDeals item=item name='deal'}>
                                    <div class="one-pastdeal">
                                        <i class="top-pastdeal"></i>
                                        <div class="body-pastdeal">
                                            <h2 class="title-pastdeal">
                                                <a href="<{$APPLICATION_URL}>/Browse/Deals/details/city/<{$city}>/id/<{$item.deal_id}>" name="BIBICA - SOCOLA CHOCOBELLA">
                                                   <{$item.title|truncate:170}></a></h2>
                                            <a href="<{$APPLICATION_URL}>/Browse/Deals/details/city/<{$city}>/id/<{$item.deal_id}>" name="" class="photo-pastdeal">
                                                <img src="<{$grouponEntity->getImage($item.picture)}>" title="" alt="" height="128" width="208">
                                                <i class="shadow"></i>
                                                <{if $item.bought_count >= $item.max_bought}>
                                                	<em class="chayhang"></em>
                                                <{/if}>
                                            </a><div class="price-pastdeal">
                                                <em><strong><{$item.bought_count}></strong> người mua</em>
                                                <span>Giá trị: <i class="through"><{$item.original_price|number_format}></i></span>
                                                <span>Tiết kiệm: <i><{math equation="(a-b)/a*100" a=$item.original_price b=$item.sale_price format="%d"}>%</i></span>
                                                <span>Còn lại: <i><{$item.sale_price|number_format}></i></span><span>Đơn vị: <i>VNĐ</i>
                                                </span></div><span class="date-pastdeal"><{$item.expired_deal}></span>
                                        </div>
                                        <i class="bottom-pastdeal"></i>
                                    </div>
                                <{/foreach}>
                                <{else}>
                                	<div class="box-white" style="height:14px;color:black;width:688px;padding-top:10px;text-align:center;font-size:20px">Không có sản phẩm nào được tìm thấy</div>
                                <{/if}>    
                                </div>
                                 
                                <div class="clear"></div>
                            </div>
<script type="text/javascript">

	jQuery('#btnSearchDealRecent').click(function(){
		var value = jQuery('#txtSearch').val();
		if(value == '')
			alert('Nhập thông tin để tiến hành tìm kiếm.');
		else
			jQuery('#frmSearch').submit();
	});
</script>
                        